package com.hibase.core.page.entity.editxml;

import java.util.List;

import com.hibase.core.page.entity.listxml.ListColumnXmlVO;
import com.hibase.core.page.entity.modulexml.Divider;
import com.hibase.core.page.entity.modulexml.ModuleAttachmentXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleCallSelectXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleCascaderXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleCheckboxXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleDateRangeXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleDateXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleEnumXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleImgXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleNumberXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleTextAreaXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleTextXmlVO;
import com.hibase.core.page.entity.modulexml.ModuleVO;
import com.hibase.core.page.entity.modulexml.MoudlePageEventsXmlVO;
import com.hibase.core.page.entity.upload.UploadLinkXmlVo;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
import com.thoughtworks.xstream.annotations.XStreamOmitField;

import lombok.Data;

/**
 * 描述:
 *
 * @author li-wei-hua
 * @date 2021-04-13 15:57
 */
@Data
public class CardLayout {

	@XStreamAsAttribute
	@XStreamAlias("title")
	private String title;

	@XStreamAsAttribute
	@XStreamAlias("type")
	private String type;

	// 是否展开
	@XStreamAsAttribute
	@XStreamAlias("expand")
	private Boolean expand;

	/**
	 * 是否隐藏，title展示，true隐藏 false展示
	 */
	@XStreamAsAttribute
    @XStreamAlias("hidden")
    private Boolean hidden;
	
	// URL的请求地址
	@XStreamAsAttribute
	@XStreamAlias("requestUrl")
	private String requestUrl;

	@XStreamOmitField
	private List<ModuleVO> moduleList;

	@XStreamImplicit(itemFieldName = "listField")
	private List<ListColumnXmlVO> listField;

	@XStreamImplicit(itemFieldName = "text")
	private List<ModuleTextXmlVO> textList;

	@XStreamImplicit(itemFieldName = "date")
	private List<ModuleDateXmlVO> dateList;

	@XStreamImplicit(itemFieldName = "dateRange")
	private List<ModuleDateRangeXmlVO> dateRangeList;

	@XStreamImplicit(itemFieldName = "callSelect")
	private List<ModuleCallSelectXmlVO> callSelectList;

	@XStreamImplicit(itemFieldName = "enum")
	private List<ModuleEnumXmlVO> enumList;

	@XStreamImplicit(itemFieldName = "number")
	private List<ModuleNumberXmlVO> numberList;

	@XStreamImplicit(itemFieldName = "textArea")
	private List<ModuleTextAreaXmlVO> textAreaList;

	@XStreamImplicit(itemFieldName = "attachment")
	private List<ModuleAttachmentXmlVO> attachmentList;

	/**
	 * 下载
	 */
	@XStreamAlias("link")
	private UploadLinkXmlVo link;

	/**
	 * 是否开启+-
	 */
	@XStreamAsAttribute
	@XStreamAlias("revision")
	private Boolean revision;

	/**
	 * 最大数量
	 */
	@XStreamAsAttribute
	@XStreamAlias("maxCount")
	private Integer maxCount;

	/**
	 * objList 后台接受key,对应传值的key
	 */
	@XStreamAsAttribute
	@XStreamAlias("revisionId")
	private String revisionId;
	
	/**
	 * 分割线条
	 */
	@XStreamImplicit(itemFieldName = "divider")
	private List<Divider> divider;
	
	/**
	 * 多选框
	 */
	@XStreamImplicit(itemFieldName = "checkbox")
	private List<ModuleCheckboxXmlVO> checkboxList;
	
	/**
	 * 支持页面初始化事件
	 */
	@XStreamAlias("pageEvents")
	private MoudlePageEventsXmlVO pageEvent;
	
	/**
	 * 图片预览
	 */
	@XStreamImplicit(itemFieldName = "img")
	private List<ModuleImgXmlVO> imgXmlVO;
	
	/**
	 * 单输入框 级联
	 */
	@XStreamImplicit(itemFieldName = "cascader")
	private List<ModuleCascaderXmlVO> cascader;
}
